package com.rdzn.mall.center.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.rdzn.mall.center.entity.PmsProductAttributeValue;
import com.rdzn.mall.center.mapper.PmsProductAttributeValueMapper;
import com.rdzn.mall.center.service.IPmsProductAttributeValueService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: pms_product_attribute_value
 * @Author: jeecg-boot
 * @Date:   2020-08-27
 * @Version: V1.0
 */

@Service
public class PmsProductAttributeValueServiceImpl extends ServiceImpl<PmsProductAttributeValueMapper, PmsProductAttributeValue> implements IPmsProductAttributeValueService {

    @Override
    public List<PmsProductAttributeValue> list(Integer productId, List<Integer> productAttributeIds) {
        return list(new LambdaQueryWrapper<PmsProductAttributeValue>()
                .eq(PmsProductAttributeValue::getProductId, productId)
                .in(PmsProductAttributeValue::getProductAttributeId, productAttributeIds)
        );
    }
}
